package com.gy.def.service.impl;

import com.gy.def.dataobject.GradeTable;
import com.gy.def.repository.GradeRepository;
import com.gy.def.service.GradeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

@Service
public class GradeImpl implements GradeService {
  @Autowired
  private GradeRepository gradeRepository;

  @Override
  public GradeTable save(GradeTable gs) {
    return gradeRepository.save(gs);
  }

  @Override
  public Page<GradeTable> findByGradeUser(String gradeUser, Pageable pageable) {
    return gradeRepository.findByGradeUser(gradeUser, pageable);
  }

  @Override
  public GradeTable findByGradeId(String gradeId) {
    return gradeRepository.findByGradeId(gradeId);
  }
}
